
'
' *  NHibernate 代码模版
' 
Imports System.IO
Imports System.Collections.Generic
Imports System.Runtime.Serialization.Formatters.Binary

Namespace NCS
	''' <summary>
	'''	
	''' </summary>
	<Serializable()> _
	Public Class method

		#Region "构造方法"
		Public Sub New()
			m_ID = 0
			m_cuser = Nothing
			m_cname = Nothing
            m_tuoqiPower = 4000
            m_chongxi_power = 3500
            m_dengdai_power = 3500
            m_sample_delay = 1
            'm_zerovalue = 0
            'm_useJiaozheng = False
            m_cswitch = 9.9
            m_sswitch = 9.9
            m_smoothnum = 30
            m_sampletime = 50 '采样时间
            m_flushtime = 15 '冲洗时间
            'm_panju = 0
            m_tuoqiTime = 20 '脱气时间
            m_dengdaitime = 50
            m_jieqi = False
            m_wlC = 0
            m_wlS = 0
        End Sub
#End Region


#Region "私有变量"
        Private m_ID As Integer
        Private m_cuser As String
        Private m_cname As String
        Private m_tuoqiPower As Integer
        Private m_chongxi_power As Integer
        Private m_dengdai_power As Integer
        Private m_sample_delay As Integer
        'Private m_zerovalue As Double
        'Private m_useJiaozheng As Boolean
        Private m_cswitch As Double
        Private m_sswitch As Double
        Private m_smoothnum As Short
        Private m_sampletime As Integer
        Private m_dengdaitime As Integer
        Private m_flushtime As Integer
        'Private m_panju As Double
        Private m_tuoqiTime As Integer
        Private m_jieqi As Boolean
        Private m_wlC As Double
        Private m_wlS As Double
        Private m_curveXishuList As IList(Of curveXishu) = New List(Of curveXishu)()
        Private m_powerList As IList(Of powerSet) = New List(Of powerSet)()

#End Region


#Region "公有属性"
        'Function ShallowClone() As method
        '    Return CType(Me.MemberwiseClone(), method)
        'End Function

        '' This is one way to do deep cloning. But works only if the 
        '' objects and its references are serializable
        'Function DeepClone() As method
        '    Dim m As New MemoryStream
        '    Dim b As New BinaryFormatter
        '    b.Serialize(m, Me)
        '    m.Position = 0
        '    Return b.Deserialize(m)
        'End Function
        '''<summary>
        '''
        '''</summary>
        Public Overridable Property ID() As Integer
            Get
                Return m_ID
            End Get
            Set(ByVal value As Integer)
                m_ID = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property cuser() As String
            Get
                Return m_cuser
            End Get
            Set(ByVal value As String)
                m_cuser = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property cname() As String
            Get
                Return m_cname
            End Get
            Set(ByVal value As String)
                m_cname = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property tuoqiPower() As Integer
            Get
                Return m_tuoqiPower
            End Get
            Set(ByVal value As Integer)
                m_tuoqiPower = value
            End Set
        End Property
        Public Overridable Property chongxi_power() As Integer
            Get
                Return m_chongxi_power
            End Get
            Set(ByVal value As Integer)
                m_chongxi_power = value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        'Public Overridable Property zerovalue() As Single
        '    Get
        '        Return m_zerovalue
        '    End Get
        '    Set(ByVal value As Single)
        '        m_zerovalue = Value
        '    End Set
        'End Property

        '''<summary>
        '''
        '''</summary>
        'Public Overridable Property useJiaozheng() As Boolean
        '    Get
        '        Return m_useJiaozheng
        '    End Get
        '    Set(ByVal value As Boolean)
        '        m_useJiaozheng = Value
        '    End Set
        'End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property cswitch() As Double
            Get
                Return m_cswitch
            End Get
            Set(ByVal value As Double)
                m_cswitch = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property sswitch() As Double
            Get
                Return m_sswitch
            End Get
            Set(ByVal value As Double)
                m_sswitch = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property smoothnum() As Short
            Get
                Return m_smoothnum
            End Get
            Set(ByVal value As Short)
                m_smoothnum = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property sampletime() As Integer
            Get
                Return m_sampletime
            End Get
            Set(ByVal value As Integer)
                m_sampletime = Value
            End Set
        End Property
        Public Overridable Property dengdai_power() As Integer
            Get
                Return m_dengdai_power
            End Get
            Set(ByVal value As Integer)
                m_dengdai_power = value
            End Set
        End Property
        Public Overridable Property sample_delay() As Integer
            Get
                Return m_sample_delay
            End Get
            Set(ByVal value As Integer)
                m_sample_delay = value
            End Set
        End Property
        Public Overridable Property dengdaitime() As Integer
            Get
                Return m_dengdaitime
            End Get
            Set(ByVal value As Integer)
                m_dengdaitime = value
            End Set
        End Property
        '''<summary>
        '''
        '''</summary>
        Public Overridable Property flushtime() As Integer
            Get
                Return m_flushtime
            End Get
            Set(ByVal value As Integer)
                m_flushtime = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        'Public Overridable Property panju() As Double
        '    Get
        '        Return m_panju
        '    End Get
        '    Set(ByVal value As Double)
        '        m_panju = Value
        '    End Set
        'End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property tuoqiTime() As Integer
            Get
                Return m_tuoqiTime
            End Get
            Set(ByVal value As Integer)
                m_tuoqiTime = value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property jieqi() As Boolean
            Get
                Return m_jieqi
            End Get
            Set(ByVal value As Boolean)
                m_jieqi = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property wlC() As Double
            Get
                Return m_wlC
            End Get
            Set(ByVal value As Double)
                m_wlC = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property wlS() As Double
            Get
                Return m_wlS
            End Get
            Set(ByVal value As Double)
                m_wlS = Value
            End Set
        End Property

        '''<summary>
        '''
        '''</summary>
        Public Overridable Property curveXishuList() As IList(Of curveXishu)
            Get
                Return m_curveXishuList
            End Get
            Set(ByVal value As IList(Of curveXishu))
                m_curveXishuList = Value
            End Set
        End Property
        Public Overridable Property powerList() As IList(Of powerSet)
            Get
                Return m_powerList
            End Get
            Set(ByVal value As IList(Of powerSet))
                m_powerList = value
            End Set
        End Property
        'Public Function getChanel(ByVal vele As String) As curveXishu
        '    Dim c As curveXishu
        '    c = Nothing
        '    For Each c In Me.m_curveXishuList
        '        If c.ele = vele Then
        '            Exit For
        '        End If
        '    Next
        '    Return c
        'End Function
#End Region

		#Region "Rewrite Equals and HashCode"
		''' <summary>
		''' 
		''' </summary>
		Public Overloads Overrides Function Equals(obj As Object) As Boolean
			If Me Is obj Then
				Return True
			End If
			If (obj Is Nothing) OrElse (obj.[GetType]() IsNot [GetType]()) Then
				Return False
			End If
			Dim castObj As method = DirectCast(obj, method)
			Return (castObj IsNot Nothing) AndAlso (m_ID = castObj.ID)
		End Function
		''' <summary>
		''' 用唯一值实现GetHashCode
		''' </summary>
		Public Overloads Overrides Function GetHashCode() As Integer
			Dim hash As Integer = 57
			hash = 27 * hash * m_ID.GetHashCode()
			Return hash
		End Function
		#End Region
	End Class
End Namespace
